<?php

class User_model extends MY_Model {

	public $primary_table = 'flat_php_users';
	public $fields = array('id','name','passwd');

	public function get($options = array())
	{
		if(isset($options['passwd'])) $options['passwd'] = $this->encrypt($options['passwd']);
		return parent::get($options);
	}

	private function encrypt($str)
	{
		return md5($str);
	}
}
